package com.hnuit.service;

import com.hnuit.Utils.MybatisUtils;
import com.hnuit.dao.GradesDao;
import com.hnuit.pojo.Grades;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.io.IOException;
import java.util.List;

public class GradesDemo {
    @Test
    public void findAllGrades() throws IOException {
        SqlSession session= MybatisUtils.getSession();
        GradesDao dao=session.getMapper(GradesDao.class);
        List<Grades> all=dao.findAllGrades();
        System.out.println(all);
        session.close();
    }
}
